<?php
/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Vote
 * @copyright  Copyright 2011 KEENONWEB LLC
 * @license    http://www.keenonweb.com/
 * @version    $Id: item.tpl 2011-03-09 01:11:30 idris $
 * @author     Idris
 */
?>
  
<?php
if (!$this->item->challenge_id) {
  return ;
}
$voting = $this->item->getVoting();
$canVote = $voting->authorization()->isAllowed(null, 'vote') && $voting->isStarted();
?>

<div class="vote-<?php echo $this->item->type; ?> item">
  <div class="photo"><?php echo $this->htmlLink($this->item->getHref(), $this->objectPhoto($this->item, 'thumb.icon'), array('class' => 'kow-tip-element', 'id' => rand().'rand-'.$this->item->getGuid())); ?></div>
  <div class="info">
    <div class="title"><?php echo $this->htmlLink($this->item->getHref(), $this->item->getTitle(), array('class' => 'kow-tip-element', 'id' => rand().'rand-'.$this->item->getGuid())); ?></div>
    <div class="rate"><?php echo $this->objectRate($this->item, $canVote, 'small'); ?></div>
    <div class="options">
      <?php echo $this->htmlLink($this->item->getHref(array('format' => 'smoothbox')), $this->translate('View'), array('class' => 'smoothbox view')); ?>
    </div>
    <div class="clr"></div>
  </div>
  <div class="clr"></div>
</div>